# $Id: PKGBUILD 142396 2011-11-08 23:03:24Z thomas $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>

pkgname=linux-manpages
pkgver=3.1
pkgrel=1
pkgdesc="Kernel hackers manual - Section 9 manpages that comes with the Linux kernel."
arch=('any')
url="http://www.kernel.org"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
replaces=('kernel26-manpages')
conflicts=('kernel26-manpages')
provides=('kernel26-manpages')
source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz")
md5sums=('edbdc798f23ae0f8045c82f6fa22c536')

build() {
  cd "${srcdir}/linux-$pkgver"
  make mandocs
}

package() {
  install -d "${pkgdir}/usr/share/man/man9/"
  install "${srcdir}"/linux-$pkgver/Documentation/DocBook/man/*.9.gz \
    "${pkgdir}/usr/share/man/man9/"

  find "${pkgdir}" -type f -exec chmod 644 {} \;
}
